# -*- coding: utf-8 -*-
# @Time : 2023/11/30 9:38
# @Author : 王薪超
# @Email : 1517113428@qq.com
# @File : page_wxc_delgroup.py
# @Project : wxczzb


from common.base_page import BasePage
from appium.webdriver.common.appiumby import AppiumBy
from time import sleep
class DelGroup(BasePage):
    btn_desktop_market = (AppiumBy.ID,'com.jhss.youguu:id/btn_desktop_market')#行情
    groups_btn = (AppiumBy.ID,'com.jhss.youguu:id/groups_btn')#全部
    TextView = (AppiumBy.XPATH,'//android.widget.TextView[@text="编辑分组"]')#编辑分组
    delete_part = (AppiumBy.ID,'com.jhss.youguu:id/delete_part')#减号
    btn_common_confirm = (AppiumBy.ID,'com.jhss.youguu:id/btn_common_confirm')#点击确定
    group_num = (AppiumBy.ID,'com.jhss.youguu:id/container')
    def no_del_group(self):
        self.click_ele(self.btn_desktop_market)#点击行情
        sleep(1)
        self.click_ele(self.groups_btn)#点击全部
        sleep(1)
        self.click_ele(self.TextView)#点击编辑分组
        sleep(1)

    def del_group(self):
        self.click_ele(self.delete_part)#点击减号
        sleep(1)
        self.click_ele(self.btn_common_confirm)#点击确定
        sleep(1)

